package services;

import domain.entities.Centro;
import domain.entities.CentroDAO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: nico
 * Date: 23/08/12
 * Time: 12:25
 * To change this template use File | Settings | File Templates.
 */
@Service
public class CentroCRUDService implements CRUDService<Centro>{

    private CentroDAO centroDAO;

    public CentroCRUDService() {
    }

    @Autowired
    public CentroCRUDService(CentroDAO centroDAO) {
        this.centroDAO = centroDAO;
    }

    @Override
    public <V extends Criteria> List<Centro> list(V criteria) {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }

    public List<Centro> findAllSites(){
        return centroDAO.findAll();
    }

    public Centro findById(Integer id){
        return centroDAO.findById(id);
    }
}
